fib n = head $ reverse lst
    where seq = 0 : scanl (+) 1 seq
          lst = take n seq

main = do
    input <- getLine
    print . fib . (read :: String -> Int) $ input
